package cn.test.web;

import cn.test.domain.User;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;

import java.util.*;

/**
 * @Title: swagger-test
 * @Package cn.test.controller
 * @Date 2018/4/28下午6:12
 * @Author PX ye
 * @E-mail yepx2013@gmail.com
 * @Company http://www.yiautos.com
 * @Description: 这是个接口
 */
@RestController
@RequestMapping(value="/hello")     // 通过这里配置使下面的映射都在/users下，可去除
public class HelloController {


    static Map<Long, User> users = Collections.synchronizedMap(new HashMap<Long, User>());

    @ApiOperation(value="test Swagger 接口", notes="")
    @ApiImplicitParam(name = "str", value = "String文本", required = true, dataType = "String", paramType = "path")
    @RequestMapping(value="/{str}", method= RequestMethod.GET)
    public String index(@PathVariable String str) {

        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);
        System.out.println("String:" + str);

        return str;
    }
}
